package yunjiao.javatutorials.designpatterns.builder.food.beverages;

import lombok.Getter;
import yunjiao.javatutorials.designpatterns.builder.meal.FoodItem;

/**
 * 饮料
 *
 * @author yangyunjiao
 */
@Getter
public abstract class Drink  implements FoodItem {
    protected BeverageSize size;

    public Drink(BeverageSize size) {
        super();
        this.size = size;
        if (this.size == null) {
            this.size = BeverageSize.M;
        }
    }

    public String drinkDetails() {
        return " (" + size + ")";
    }
}
